using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class KillSelfDelay : MonoBehaviour
{
    public float delay;
    public string fxAudio;

    private void Start()
    {
        if (fxAudio.Length > 0)
            AudioManager.Instance.PlaySE(fxAudio);
    }

    void Update()
    {
        if (GameManager.Instance.isPause)
            return;

        delay -= Time.deltaTime;
        if (delay <= 0.0f)
            Destroy(gameObject);
    }
}
